package com.chj.dao;

import java.util.List;

import com.chj.entity.User;

public interface UserDAO {

	/**
	 * 通过userId,userPassword获取用户
	 * @param userId
	 * @param userPassword
	 * @return
	 */
	public User get(String userId
			      , String userPassword);

	/**
	 * checkUserIdExist
	 * @param userId
	 */
	public boolean checkUserIdExist(String userId);

	/**
	 * addUser
	 * @param user
	 * @return
	 */
	public boolean addUser(User user);

	/**
	 * getAdmin
	 * @param userId
	 * @param password
	 * @return
	 */
    public User getAdmin(String userId, String password);

    //通过条件查询后台
    public List<User> getUserListBy(String userName
                                   ,String userPhone
                                   ,String userEmail
                                   ,String dateBegin
                                   ,String dateEnd
                                   ,int userType
                                   ,int page
                                   ,int rows);

    //通过条件查询后台的数量
    public int getUserListSizeBy(String userName
                                ,String userPhone
                                ,String userEmail
                                ,String dateBegin
                                ,String dateEnd
                                ,int    userType);

    //更新用户操作
    public int update(User user);
    
    public User getUserByUserPk(String userPk);

    
}
